<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'user-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array('enctype' => 'multipart/form-data'), 
)); ?>

<?php
	if(Yii::app()->user->hasFlash('success')) {
		echo '<div class="alert alert-success">'.Yii::app()->user->getFlash('success').'</div>';
	} 
?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'gradeID'); ?>
		<?php echo $form-> dropdownList($model,'gradeID',$model->getGrade(),array('prompt'=>'Chọn lớp'))?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'subjectID'); ?>
		<?php echo $form-> dropdownList($model,'subjectID',$model->getSubject(),array('prompt'=>'Chọn môn học'))?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'content'); ?>
		<?php echo $form->textField($model,'content',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'content'); ?>
	</div>
	
	<div>
		<?php echo $form->labelEx($model,'image'); ?>
		<?php $this->widget('CMultiFileUpload', array(
								'model'=>$model,// dong nay lam gi>
								'max'=>5,// gioi han so luong file?
                'name' => 'Issue[image]',
                'accept' => 'jpeg|gif|png|jpg', // useful for verifying files
                'duplicate' => 'File bị trùng, vui lòng chọn lại!', // useful, i think
                'denied' => 'File không hợp lệ', // useful, i think
            ));
    ?>	
   
	</div>
		
	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->